package week12;

class Account{
			private int balance;

			public Account(int money){
			this.balance = money;
			}

			public int getBalance() {
			return balance;
			}//201421123042
			public synchronized void deposit(int money){
				synchronized (this) {
			         balance += money; 
			   }
			}
			public synchronized void withdraw(int money){
				synchronized (this) {
			balance -= money;
			    }
			}
			}

